package net.liteheaven.xblib.common.io.reborn;

import android.content.Context;

import net.liteheaven.XbApp;
import net.liteheaven.xblib.common.log.XLog;

import java.io.Serializable;

/**
 * 可重生动作
 * Created by liangy on 2017/1/20.
 */
public abstract class RebornAction implements Serializable, IRebornAction {
    @Override
    public void onExecute(Context context) {
        XLog.i(RebornConfig.TAG, "onExecute: " + getClass().getName());
    }

    public void save(){
        Context ctx = XbApp.getInstance().getContext();
        RebornManager.getInstance().bury(ctx, getType(), this);
    }

    abstract public String getType();
}
